package com.example.myapp;

import android.content.Intent;
import android.os.Bundle;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

//注册成功界面
public class RegisterSuccessActivity extends AppCompatActivity {

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_registersuccess_layout);
        findViewById(R.id.register_success_bt).setOnClickListener(v->{
            toLoginAct();
        });
        findViewById(R.id.register_success_back_img).setOnClickListener(v->{
            toLoginAct();
        });
    }
  //调到登录页，并关闭该页面
    private void toLoginAct() {
        Intent intent = new Intent(RegisterSuccessActivity.this, LoginActivity.class);
        intent.putExtra("registerStatus","Y");
        startActivity(intent);
        finish();
    }
}
